package com.weapp.system.controller;

import com.weapp.system.entity.User;
import com.weapp.system.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author jsy
 * @description: test
 * @date 2022/6/30 15:07
 */

@RestController
public class UserController {

  @Autowired
  UserServiceImpl userService;
  @GetMapping("/hello")
  public String hello() {
    System.out.println(("----- selectAll method test ------"));
    List<User> userList = userService.list();
    //Assert.isTrue(userList.size() == 5, "true");
    userList.forEach(System.out::println);
    return userList.toString();
  }
}
